﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Account_Default : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // Label1.Text = Page.FindControl("Content2").ID.ToString();
    }
    protected override void OnInit(EventArgs e)
    {
        if (Server.UrlEncode(Request.QueryString["controller"]) != null)
        {
            string controller = Server.UrlEncode(Request.QueryString["controller"]);
            switch (controller.ToLower())
            {
                default:
                    PlaceHolder1.Controls.Add(LoadControl(@"List.ascx"));
                    break;
                case "create":
                    PlaceHolder1.Controls.Add(LoadControl(@"Create.ascx"));
                    break;
                case "edit":
                    PlaceHolder1.Controls.Add(LoadControl(@"Edit.ascx"));
                    break;
                case "createorupdate":
                    PlaceHolder1.Controls.Add(LoadControl(@"CreateOrUpdate.ascx"));
                    break;
                case "delete":
                    PlaceHolder1.Controls.Add(LoadControl(@"Delete.ascx"));
                    break;
                case "changepassword":
                    PlaceHolder1.Controls.Add(LoadControl(@"ChangePassword.ascx"));
                    break;
            }
        }
        else
        {
            PlaceHolder1.Controls.Add(LoadControl(@"List.ascx"));
        }
        base.OnInit(e);
    }     
}

